<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        [title~="mm"]{
            color: red;
        }
    </style>
</head>
<body>
<p title="aaa zzz xxx">这个有title</p>
<p title="bbb mm m">这个有title</p>
<p title="ccc nnn">没有title</p>
<p>没有title</p>
</body>
</html>